package com.yanqu.road.server.gameplayer.module.activity.cat.action;

import com.yanqu.road.entity.activity.cat.Element;
import com.yanqu.road.server.gameplayer.module.activity.cat.CatConnectExcetpion;
import com.yanqu.road.server.gameplayer.module.activity.cat.ConnectResult;

public class NullElementAction extends BaseElementAction {

    public NullElementAction(int type) {
        super(type);
    }

    @Override
    boolean accept(Element element, Element next, ConnectResult context) {
        context.setRet(-1);
        return false;
    }

    @Override
    void connect(Element element, ConnectResult context) {
        throw new CatConnectExcetpion(-1);
    }

    @Override
    void change(Element element, ConnectResult context) {
        super.changeNext(context);
    }

    @Override
    void attack(Element element, ConnectResult context) {
        super.attackNext(context);
    }

    @Override
    void generate(Element element, ConnectResult context) {


        super.generateNext(context);
    }
}
